package com.app.dao;

import com.app.entity.ResidentialWorker;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by xinjian.hu on 18-3-22.
 */
public interface StaffDao {
    /**
     * 获取分页列表
     *
     * @param offset
     * @param pageSize
     * @param workerType
     * @param workerName
     * @return
     */
    public List<ResidentialWorker> queryStaffList(@Param("offset") int offset,
                                                  @Param("pageSize") int pageSize,
                                                  @Param("workerType") String workerType,
                                                  @Param("workerName") String workerName);

    /**
     * 获取总数量
     *
     * @param workerType
     * @param workerName
     * @return
     */
    public Integer getCount(@Param("workerType") String workerType,
                            @Param("workerName") String workerName);

    /**
     * 获取详情
     *
     * @param workerId
     * @return
     */
    public ResidentialWorker getStaffDetail(@Param("workerId") int workerId);

    /**
     * 更新用户信息
     *
     * @param residentialWorker
     */
    public void updateWorker(@Param("residentialWorker") ResidentialWorker residentialWorker);

    /**
     * 新增用户信息
     *
     * @param residentialWorker
     */
    public void addWorker(@Param("residentialWorker") ResidentialWorker residentialWorker);


}
